18. limit instruction
你好。
Hello.
在本教程中,我们将学习限制指令,并假设您想要对 HDMI 输入进行限制,例如,您的电机速度最大为 50 赫兹。
In this tutorial, we will learn limit instructions and imagine you want to put a limit to your HDMI inputs, for example, your motor speed is maximum 50 hertz.
但想象一下您的客户或员工被输入,例如 500 万。
But imagine your customer or the employee is entered, for example, 5000 thousand.
会发生什么?
What will happen?
然后就会报错,或者会阻塞机器部分等等。
Then it will give an error, or it will block the machine part then, etc.
现在可以限制在右侧。
Right now can be limited into the right side.
您将看到选择确定。
You will see the selection OK.
如果你去选择,你会看到限制功能。
If you go to selection, you will see the limit function.
如果我用拖放方法将其放在这里,您将看到最小输入和我的数据输入,这是我的最大输入。
If I put it to here with the drag and drop method, you will see a minimum input and my data input and this is my maximum.
而且这还是有限的数据。
And this is the limited data.
好的,让我们从最小输入开始。
OK, let's start with the minimum input.
好吧,我们先来定义一下。
OK, let's define first.
最小输入为零。
The minimum input is zero.
这里是零,但它只是跳到这里。
This right here is zero, but it just jump to here.
对此感到抱歉。
Sorry for that.
我们需要继续前进。
We need to go to forward.
最低限度是我会在这里写零,好的。
The minimum is I will write here zero, OK.
还有我的最大值。
And my maximum.
他快100岁了。
He is going to be 100.
输入数据将为零,输出数据将被写入数据。
An input data is going to be this zero and output data is going to be written into data.
现在在 0 到 100 之间会发生什么?
What will happen now between zero and 100?
但我会把它改成,比如三个,给大家看。
But I will change it to, for example, three to show it to you.
首先,我将转换我的项目并重建。
And firstly, I will convert my project and let's rebuild.
所有这些程序现在都已转换,我们可以从模拟器开始。
All this program is converted now and we can start with the simulator.
好的?
OK?
模拟器正在打开,我们正在写入策略,PLC 已启动,输出现在为 3,因为我的输入数据小于最小数据。
The simulator is opening and we are writing to the policy and plc is powered on and the output is now three because of why my input data is less than minimum data.
因此最小的数据被写入输出。
So the minimum data is written into output.
好的,让我们插入零来观看一。
OK, let's insert is the zero to watch one.
我会在这里写。
And here I will write.
例如,将 50 和 50 写入输出。
For example, 50 and 50 is written into output.
为什么?
Why?
因为我的输入数据在最小和最大数据之间。
Because my input data is between minimum and maximum data.
如果这个比100大,比如101,并且因为我的输入比最大数据大,所以最大数据被写入输出,好吗?
If this is bigger than 100 like 101 and because of my input is bigger than maximum data, so the maximum data is written into output, OK?
如果这小于最小数据(如 1)并且最小数据被写入输出,这就是限制函数的运行方式。
If this is less than minimum data like one and the minimum data is written to output, this is how limit function is running.
好的?
OK?
如果我写你的 99,如果我写你的 25,这些都在范围内。
If I write your 99 and if I write your twenty five, these are between the range.
因此,这些会突然写入输出。
Because of that, these are suddenly written to the output.
没关系。
That's OK.
这就是我们限制输入和输出的方法。
This is how we can limit an input and output.
没关系。
That's OK.
这非常重要,因为您的机器和数据(例如电机速度)以及您需要使用的传感器部分的一些调整。
And this is really important y because of your machine and data like the speed of the motor, like the as some adjustments on the sensor sector you need to use.
限制本教程的说明。
Limit instructions for this tutorial.
我到这里就结束了。
I'm finished here.
下一个故事见?
See you in the next story?